<?php
include ("inc/header.php");
$url="news.php?menuname=1_2";
?>
<!--main start-->
<div class="main">
	
	<div class="main_content">
		<!--main_right start-->
		<div class="main_news_left">
			<!--block start-->
			
			<div class="main_left_title">Blog
				<div class="tip"></div>
			</div>
			<div class="main_right_top">
				<?
				 $sql="SELECT * FROM blog where pic <> '' order by id desc limit 1";
				 $result=mysql_query($sql) or die(mysql_error());
				while ($rs=mysql_fetch_array($result)){
				?>
				<div class="main_right_top_title"><a href="blog_detail.php?id=<?=$rs["id"]?>"><?=$rs["title"]?></a></div>
				<img src="<?=$rs["pic"]?>" width="295" height="95"/>
				<?}?>
				<ul class="bottom">
					<?
					 $sql="SELECT * FROM blog order by id desc limit 5";
					 $result=mysql_query($sql) or die(mysql_error());
					while ($rs=mysql_fetch_array($result)){
					?>
					<li><p><a href="blog_detail.php?id=<?=$rs["id"]?>"><?=$rs["title"]?></a></p><span><?=$rs["operater"]?></span></li>
					<?
					}
					?>
				</ul>
				<div class="main_left_video_bottom"><a href="blog.php">View all</a></div>
				
			</div>
			
			<!--block end -->
			<!--block start-->
			<div class="line"></div>
			<div class="main_left_title">Gallery
				<div class="tip"></div>
			</div>
			<div class="main_right_middle">
				<ul>
					<?
					 $sql="SELECT * FROM pic order by id desc limit 9";
					 $result=mysql_query($sql) or die(mysql_error());
					while ($rs1=mysql_fetch_array($result)){
					?>
					<li><a href="pic_detail.php?id=<?=$rs1["id"]?>"><img src="<?=$rs1["text"]?>" width="90" height="90"/></a></li>
					<?
					}
					?>
				</ul>
				<div class="main_left_video_bottom"><a href="pic.php">View all</a>&nbsp;&nbsp;&nbsp;</div>
			</div>
			<!--block end -->
			
		</div>
		
		<form name="form1" action="<?echo $url?>" method="post">
 		</form>
		<div class="main_right_news">
			<div class="line"></div>
			<ul>
				<?
				$tab="news";
				include ("pagination.php");
				$i=1;
				while ($rs=mysql_fetch_array($result)){
				?>
				<li><a href="news_detail.php?id=<?=$rs["id"]?>"><?=$rs["title"]?></a></li>
				<?}?>
			</ul>
			<div class="page2"><?include ("page.php");?> </div>
		</div>
		<!--main_right end-->
		<div style="clear:both;"></div>
	</div>
	
	<?php
		include ("inc/footer.php");
		?>
</div>
<!--main end-->

</body>
</html>
